<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<div id="studentHome">
		<fieldset class="layui-elem-field layui-field-title site-title">
			<legend>
				<a name="fixbar">考勤修改</a>
			</legend>
		</fieldset>
		<form class="layui-form white-bg radius" >
			<input type="hidden" name="limit" value="${param.limit}"> <input
				type="hidden" name="page" value="${param.page}"> <input
				id="kqid" type="hidden" name="id" value="${model.id}">
			<%-- <input type="hidden" name="tbClass.id" value="${model.tbClass.id}"> --%>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">班级</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" readonly="readonly"
							value="${model.banji}">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">学员</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" readonly="readonly"
							value="${model.studentName}">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">课程</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" readonly="readonly"
							value="${model.curriculumName}">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">时间</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" readonly="readonly"
							value="${model.time}">
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-inline">
					<label class="layui-form-label">考勤状态</label>
					<div class="layui-input-block">
						<select id="isReach" name="isReach">
							<c:forEach items="${data}" var="data">
								<option value="${data.name}"
									<c:if test="${fn:contains(model.isReach,data.name)}">selected="selected"</c:if>>${data.name}</option>
							</c:forEach>
						</select>
					</div>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button type="button" class="layui-btn" onclick="tijiao()">提交</button>
					<button type="button" class="layui-btn layui-btn-primary" onclick="fan()">返回</button>
				</div>
			</div>
		</form>
	</div>
	<script type="text/javascript">
		layui.use('form', function() {
			var form = layui.form;
			form.render('select');
		})
		function tijiao(){
			var isReach = $("#isReach").val();
			var id = $("#kqid").val();
			$.post("checkingin/tijiao",{id:id,isReach:isReach},function(msg){
				layer.msg(msg);
				$("#content").load("${pageContext.request.contextPath }/checkingin/manage");
			});
		}
		function fan(){
			$("#content").load("${pageContext.request.contextPath }/checkingin/manage");
		}
	</script>
</body>
</html>